home *** CD-ROM | disk | FTP | other *** search
- Path: teamserve.paradigm.co.za!not-for-mail
- From: jfk@teamserve.paradigm.co.za (Jan Kaluza)
- Newsgroups: comp.lang.c
- Subject: Re: How do you reset the computer using C on a PC ?
- Date: 15 Mar 1996 11:09:56 GMT
- Organization: No organisation supplied
- Distribution: world
- Message-ID: <4ibj64$u2@hermes.is.co.za>
- References: <31473FD4.48AA@ccis.com> <Pine.A32.3.91.960313183048.180818A-100000@red.weeg.uiowa.edu>
- NNTP-Posting-Host: teamserve.paradigm.co.za
- X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]
-
- The Amorphous Mass (robinson@blue.weeg.uiowa.edu) wrote:
- : On Wed, 13 Mar 1996, Derek Lund wrote:
- :
- : > Help?
- :
- : int main(void)
- : {
- : printf("press ctrl-alt-del.");
- : return 0;
- : }
- :
- : For a more useful answer, try comp.os.msdos.programmer.help (or
- : comp.os.ms-windows.programmer, etc).
- :
- : /**James Robinson***********************
- : "If a fatal error occurs, the program should not be allowed to continue."
- : -- Oracle Pro*C User's Guide *************james-robinson@uiowa.edu**/
-
- More seriously: when you want to reset the PC, call this function:
-
- void resetPC(void) {
- struct REGPACK rr;
- intr(25,&rr);
- }
-
- This works for Turbo C/Borland C. For other compilers there must be an
- equivalent. Interrupt 25 resets the PC in DOS. I found it hangs up a
- DOS session in Windows rather nastily.
- --
- Jan KALUZA: jfk@paradigm.co.za [Box 4687, The Reeds, 0158, RSA] |Psalm
- Genghis Janus (Std Disclaimer: My views are mine, mine and mine again!) |97:11
- Light is sown as seed for the righteous and gladness for the upright in heart.
-